import { configureStore, ThunkAction, Action } from '@reduxjs/toolkit';
// import counterReducer from '../features/counter/counterSlice';
// 对createStore的封装，slice的reduce,包含redux-thunk
import userlice from './slice/info'

export const store = configureStore({
  reducer: {
    info: userlice,
    // counter: counterReducer,
  },
});
// 类型定义
export type AppDispatch = typeof store.dispatch;
export type RootState = ReturnType<typeof store.getState>;//state类型定义
export type AppThunk<ReturnType = void> = ThunkAction<
  ReturnType,
  RootState,
  unknown,
  Action<string>
>;
